if (e.message.indexOf('No key available with this passphrase') != -1) {
this._reaskPassword(volume);
} else {
- log('Unable to mount volume ' + volume.get_name() + ': ' + e.toString());
+ if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.FAILED_HANDLED))
+ log('Unable to mount volume ' + volume.get_name() + ': ' + e.toString());
+
this._closeOperation(volume);
}
}
try {
mount.unmount_with_operation_finish(res);
} catch (e) {
- // FIXME: we need to ignore G_IO_ERROR_FAILED_HANDLED errors here
- // but we can't access the error code from JS.
- // See https://bugzilla.gnome.org/show_bug.cgi?id=591480
- log('Unable to eject the mount ' + mount.get_name()
- + ': ' + e.toString());
+ if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.FAILED_HANDLED))
+ log('Unable to eject the mount ' + mount.get_name()
+ + ': ' + e.toString());
}
},
try {
source.eject_with_operation_finish(res);
} catch (e) {
- // FIXME: we need to ignore G_IO_ERROR_FAILED_HANDLED errors here
- // but we can't access the error code from JS.
- // See https://bugzilla.gnome.org/show_bug.cgi?id=591480
- log('Unable to eject the drive ' + source.get_name()
- + ': ' + e.toString());
+ if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.FAILED_HANDLED))
+ log('Unable to eject the drive ' + source.get_name()
+ + ': ' + e.toString());
}
},
try {
drive.stop_finish(res);
} catch (e) {
- // FIXME: we need to ignore G_IO_ERROR_FAILED_HANDLED errors here
- // but we can't access the error code from JS.
- // See https://bugzilla.gnome.org/show_bug.cgi?id=591480
- log('Unable to stop the drive ' + drive.get_name()
- + ': ' + e.toString());
+ if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.FAILED_HANDLED))
+ log('Unable to stop the drive ' + drive.get_name()
+ + ': ' + e.toString());
}
},
});